home *** CD-ROM | disk | FTP | other *** search
- Path: news.bridge.net!news
- From: David Byrden <100101.2547@compuserve.com>
- Newsgroups: comp.lang.c++
- Subject: Re: Constructor classes
- Date: 23 Feb 1996 08:27:56 GMT
- Organization: self-employed
- Message-ID: <4gjtqc$45a@news.bridge.net>
- References: <4gi8es$4gn@daily-planet.execpc.com>
- NNTP-Posting-Host: ppp-mia1-45.bridge.net
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
-
-
-
- >> How do I access the array's data members? I have tried:
- >> m_itema[0], ContainerClass->m_itema[0],
- >> ContainerClass.m_itema[0], OtherClass->m_itema[0].
- >> OtherClass.m_itema[0], etc. etc.
-
- You are confusing classes with objects.
-
- A class is a "type of thing". An object is an actual thing.
-
- Does this code make sense?
-
-
- ContainerClass aContainer ; // declare an object
-
-
- aContainer.Items[0].m_itema[0]
-
- The above expression refers to one char within the container.
- However, you can't actually write except where you have access to the
- private parts of OtherClass.
-
-
- David
-
-
-